Skip to content

EMIN AKTURK | BIRMINGHAM | MODULE-DATA-GROUPS - SPRINT 1 #754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

eminakturk
Copy link

@eminakturk eminakturk commented Aug 8, 2025

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

@eminakturk eminakturk added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 8, 2025
@LonMcGregor LonMcGregor added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 11, 2025
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work on this sprint - I think most of the answers are good, but I do have a question about the dedupe task

}

const seen = new Set();
return elements.filter(element => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While using a filter here does work, I feel like it is perhaps not the most logical way to approach this task.

Filters are typically used to transform one array into another, here you are using it to make changes to a set. Can you think of a way to rewrite this that might make it more readable / clear what the code is intended to do?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your review. I have added codes that could be more logical and easier to read.

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Aug 11, 2025
@eminakturk eminakturk added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 12, 2025
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an improvement to the duplicate and its easier to read. But here you are now adding to a second array as well as the set. As you are using a set, can you think of a way to use just those values in the set and not need to duplicate the values in an array as well?

@LonMcGregor LonMcGregor removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 13, 2025
@eminakturk
Copy link
Author

eminakturk commented Aug 13, 2025

That was a great point, I adjusted the code as you wish. I hope that would be enough 👍

@eminakturk eminakturk added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 13, 2025
@LonMcGregor
Copy link

Good work - you are done with this sprint now, well done

@LonMcGregor LonMcGregor added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complete Volunteer to add when work is complete and all review comments have been addressed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants